const app = getApp();
Component({
    data: {
        show: true,
        selected: 0,
        color: "#7A7E83",
        selectedColor: "#3cc51f",
        list: [{
                pagePath: "/pages/index/index",
                text: "Show",
                image: "/assets/icon/zhantai.png",
                image1: "/assets/icon/zhantai1.png",
                Etext: "互动体验"
            },
            {
                pagePath: "/pages/More/More",
                image: "/assets/icon/hudong.png",
                image1: "/assets/icon/hudong1.png",
                text: "my",
                Etext: "礼品兑换"
            },
            {
                pagePath: "/pages/points/points",
                image: "/assets/icon/lp.png",
                image1: "/assets/icon/lp1.png",
                text: "my",
                Etext: "了解更多"
            },
        ],

        isIpx: false
        // Choose:"https://easysart.oss-cn-shenzhen.aliyuncs.com/faceplay/face/%E5%85%AC%E7%94%A8/btn1.png",
        // NoChoose:"https://easysart.oss-cn-shenzhen.aliyuncs.com/faceplay/face/%E5%85%AC%E7%94%A8/btn2.png",
    },
    attached() {
        this.setData({
            isIpx: app.globalData.isIpx,
        })
        // //console.log(this.data.isIpx)
    },
    methods: {
        switchTab(e) {

            const data = e.currentTarget.dataset
            // //console.log(data)
            const url = data.path

            this.setData({
                selected: data.index
            })
            // if(data.index == 2){
            //   wx.reLaunch({url})
            // }else{
            wx.switchTab({
                url
            })
            // }

        }
    }
})